package com.bvgol.examples.springboot.redis.controller;/**
 * @Classname MD5Controller
 * @Description TODO
 * @Date 2021/3/19 9:32
 * @Created by GUOCHEN
 */

import com.bvgol.examples.springboot.redis.entity.Book;
import com.bvgol.examples.springboot.redis.logic.LogicService;
import com.bvgol.examples.springboot.redis.utils.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: my-spring-completely
 * @description: md5f方式防重复提交
 * @author: GUOCHEN
 * @create: 2021/03/19 09:32
 */
@RestController
@AllArgsConstructor
public class MD5Controller {

    private LogicService logicService;

    /**
     * @param
     * @param book
     * @return
     * @Classname
     * @Description TODO
     * @Date 2021/3/19 9:34
     * @auther by GUOCHEN
     */
    @PostMapping("post/md5")
    public Object md5(@RequestBody Book book) {

        return R.data(logicService.md5(book));
    }
}
